{yun:}include file="$trainstyle/header.htm"{/yun}
<script src="{yun:}$config.sy_weburl{/yun}/js/public.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/binding.js?v={yun:}$config.cachecode{/yun}"></script>
<script>var weburl="{yun:}$config.sy_weburl{/yun}";</script>
<div class="clear"></div>
<div class="training_content training_w980">
{yun:}include file="$trainstyle/left.htm"{/yun}
<div class="right_column frt mt20">
<div class="right_column_border_admin">
<div class="right_column_h1"><span class="right_column_h1_span flt">帐号绑定</span> </div>
<div  class="resume_box_list">
  <!--<div class="resume_Prompt"> 绑定手机号码、完成邮箱验证，可以增加求职反馈的及时性和准确性，从而提高求职成功率 </div>-->
<div class="Binding_h1 mt10">登录用户名：{yun:}$username{/yun}</div>
<div class="Binding_h1">上次登录时间：{yun:}$member.login_date|date_format:"%Y-%m-%d %H:%M:%S"{/yun}  <a href="index.php?c=password" class="Binding_a">修改密码</a></div>
{yun:}if $member.setname==1{/yun}
<!--<div class="Binding_hint"><span class="Binding_hint_left">您有一次修改账户名和重置一次密码机会<b>（仅限一次）</b></span><a href="index.php?c=setname">立即修改</a></div>-->
{yun:}/if{/yun}
          <div class="Binding_list">
            <div class="Binding_list_left"><div class="bingding_yx {yun:}if $info.email_status==1{/yun}bingding_yx_cur{yun:}/if{/yun}"><i class="binding_yx_icon"></i></div><span class="bingding_yx_wr">邮箱</span></div>
            {yun:}if $info.email_status==1{/yun}
            <div class="Binding_list_text">当前邮箱已验证：<b class="Binding_list_b">{yun:}$info.linkmail{/yun}</b> </div>
            <div class="Binding_oper"><a href="javascript:void(0)" onClick="layer_del('确定要取消绑定？','index.php?c=binding&act=del&type=email');" class="Binding_submit_qx">取消绑定</a></div>
            {yun:}else{/yun}
            <div class="Binding_list_text">当前邮箱未验证：<b class="Binding_list_b">{yun:}$info.linkmail{/yun}</b> 邮箱验证后，<br>可以通过邮箱随时取回账户密码。</div>
            <div class="Binding_oper"><a  href="javascript:getshow('email','绑定邮箱');" class="Binding_submit">立即绑定</a></div>
            {yun:}/if{/yun}
          </div>
          <div class="Binding_list">
            <div class="Binding_list_left"><div class="bingding_yx {yun:}if $info.moblie_status==1{/yun}bingding_yx_cur{yun:}/if{/yun}"><i class="binding_sj_icon"></i></div><span class="bingding_yx_wr">绑定手机</span></div>
            {yun:}if $info.moblie_status==1{/yun}
            <div class="Binding_list_text">当前手机已绑定：
            <b class="Binding_list_b">{yun:}$info.linktel{/yun}</b> </div>
            <div class="Binding_oper"><a href="javascript:void(0)" onClick="layer_del('确定要取消绑定？','index.php?c=binding&act=del&type=moblie');" class="Binding_submit_qx">取消绑定</a></div>
            {yun:}else{/yun}
            <div class="Binding_list_text">当前手机未绑定：
            <b class="Binding_list_b">{yun:}$info.linktel{/yun}</b> 绑定后可使用该手机登录账号<br>或找回密码</div>
            <div class="Binding_oper"><a  href="javascript:getshow('moblie','绑定手机号码');" class="Binding_submit">立即绑定</a></div>
          	{yun:}/if{/yun}
          </div>
          {yun:}if $config.sy_qqlogin=='1'{/yun}
          <div class="Binding_list">
            <div class="Binding_list_left"><div class="bingding_yx {yun:}if $member.qqid!=""{/yun}bingding_yx_cur{yun:}/if{/yun}"><i class="binding_qq_icon"></i></div><span class="bingding_yx_wr">绑定QQ</span></div>
            {yun:}if $member.qqid!=""{/yun}
            <div class="Binding_list_text Binding_list_text_mt">已绑定QQ号</div>
            <div class="Binding_oper"><a href="javascript:void(0)" onClick="layer_del('确定要取消绑定？','index.php?c=binding&act=del&type=qqid');" class="Binding_submit_qx">取消绑定</a></div>
            {yun:}else{/yun}
            <div class="Binding_list_text Binding_list_text_mt">未绑定QQ号</div>
            <div class="Binding_oper"><a href="{yun:}url m=qqconnect  login=1{/yun}" class="Binding_submit">立即绑定</a></div>
            {yun:}/if{/yun}
          </div>
          {yun:}/if{/yun}
          {yun:}if $config.sy_sinalogin=='1'{/yun}
          <div class="Binding_list">
            <div class="Binding_list_left"><div class="bingding_yx {yun:}if $member.sinaid!=""{/yun}bingding_yx_cur{yun:}/if{/yun}"><i class="binding_xl_icon"></i></div><span class="bingding_yx_wr">绑定新浪微博</span></div>
            {yun:}if $member.sinaid!=""{/yun}
            <div class="Binding_list_text Binding_list_text_mt">已绑定，可使用新浪微博快速登录</div>
            <div class="Binding_oper"><a href="javascript:void(0)" onClick="layer_del('确定要取消绑定？','index.php?c=binding&act=del&type=sinaid');" class="Binding_submit_qx">取消绑定</a></div>
            {yun:}else{/yun}
            <div class="Binding_list_text Binding_list_text_mt">授权绑定后，可使用新浪微博快速登录</div>
            <div class="Binding_oper"><a href="{yun:}url m=sinaconnect login=1{/yun}" class="Binding_submit">立即绑定</a></div>
            {yun:}/if{/yun}
          </div>
          {yun:}/if{/yun}
          <div class="Binding_list">
            <div class="Binding_list_left"><div class="bingding_yx {yun:}if $member.wxopenid!="" || $member.wxid!=''{/yun}bingding_yx_cur{yun:}/if{/yun}"><i class="binding_wx_icon"></i></div><span class="bingding_yx_wr">绑定微信</span></div>
            {yun:}if $member.wxopenid!="" || $member.wxid!=''{/yun}
            <div class="Binding_list_text  Binding_mt">已绑定，可使用微信扫描登录</div>
            <div class="Binding_oper"><a href="javascript:void(0)" onClick="layer_del('确定要取消绑定？','index.php?c=binding&act=del&type=wxid');" class="Binding_submit_qx">取消绑定</a></div>
            {yun:}else{/yun}
            <div class="Binding_list_text  Binding_mt">授权绑定后，可使用微信扫描登录</div>
            {yun:}if $config.wx_author!='1'{/yun}
            <div class="Binding_oper"><a href="javascript:void(0)" onclick="layer.msg('对不起，微信绑定已关闭！' ,2 ,8); return false;" class="Binding_submit">立即绑定</a></div>
            {yun:}else{/yun}
            <div class="Binding_oper"><a href="javascript:void(0)" onclick="wxshow();" class="Binding_submit">立即绑定</a></div>
            {yun:}/if{/yun}
            {yun:}/if{/yun} 
		  </div>
          <div class="Binding_list">
            <div class="Binding_list_left"><div class="bingding_yx {yun:}if $info.yyzz_status==1{/yun}bingding_yx_cur{yun:}/if{/yun}"><i class="binding_sf_icon"></i></div><span class="bingding_yx_wr">培训执照</span></div>
            {yun:}if $info.yyzz_status==1{/yun}
            <div class="Binding_list_text Binding_list_text_mt" style="width:300px;">已验证</div>
            <div class="Binding_oper">
            <a href="javascript:getyyzz('上传培训执照','550','400');" class="Binding_submit_rz">重新认证</a></div>
            {yun:}else{/yun}
                {yun:}if !empty($cert){/yun}
                    {yun:}if $cert.status==2{/yun}
                    <div class="Binding_list_text Binding_list_text_mt" style="width:300px;">审核未通过 {yun:}if $cert.statusbody{/yun}原因：{yun:}$cert.statusbody{/yun}{yun:}/if{/yun}</div>
                    <div class="Binding_oper"><a href="javascript:getyyzz('上传培训执照','550','310');" class="Binding_submit_rz">重新上传</a></div>
                    {yun:}else{/yun}
                    <div class="Binding_list_text Binding_list_text_mt" style="width:300px;">培训执照已上传，请等待管理员审核</div>
                    <div class="Binding_oper"><a  href="javascript:getyyzz('上传培训执照','550','310');" class="Binding_submit_rz">重新上传</a></div>
                    {yun:}/if{/yun}
                {yun:}else{/yun}
                <div class="Binding_list_text Binding_list_text_mt" style="width:300px;">当前未上传培训执照</div>
                <div class="Binding_oper"><a  href="javascript:getyyzz('上传培训执照','550','310');" class="Binding_submit_rz">未验证</a></div>
                {yun:}/if{/yun}
            {yun:}/if{/yun}
          </div>
          
        </div>
      </div>
    </div>
  </div>

<!--绑定邮箱弹出框-->
<div id="email" style="display:none;">
	<div class="Binding_pop_box" style="padding:10px;width:480px;height:255px; background:#fff">
		<div class="Binding_pop_box_msg">修改后的邮箱将作为新的登录账号</div>
		<div style="padding:20px 0">
			<div class="Binding_pop_box_list">
				<span class="Binding_pop_box_list_left"><i class="Binding_pop_box_list_left_i">*</i>新的邮箱：</span>
				<input type="text" name="email" value="{yun:}$info.linkmail{/yun}" class="Binding_pop_box_list_text Binding_pop_box_list_textw200">
			</div>
			
			<div class="Binding_pop_box_list">
				<span class="Binding_pop_box_list_left"><i class="Binding_pop_box_list_left_i">*</i>验证码：</span>
				<input type="text" name="email_code" class="Binding_pop_box_list_text">
				<img id="vcode_img" src="{yun:}$config.sy_weburl{/yun}/app/include/authcode.inc.php" style=" margin:0 5px 5px 5px; vertical-align:middle;">
				<a href="javascript:void(0);" onclick="checkCode('vcode_img');">看不清</a>
			</div>
			
			<div class="Binding_pop_sub" style="margin-top:20px;">
				<span class="Binding_pop_box_list_left">&nbsp;</span>
				<input class=" xubox_botton_emali" style="margin-right:10px;" type="submit" onclick="sendbemail('vcode_img');" value="发送验证邮箱">
				<input class=" xubox_botton_emali  xubox_botton_emali_qx" type="button" value="取消" onclick="layer.closeAll();">
			</div>
		</div>
	</div>
</div>
<!--弹出框 end-->

<!--绑定手机弹出框-->
<div id="moblie" style=" display:none;">
	<div class="Binding_pop_box" style="padding:10px;width:480px;height:255px; background:#fff;">
		
		<div class="Binding_pop_box_msg">绑定完成后，您可以使用该手机号码登录账号、找回密码</div>
		
		<div style="padding:20px 0">
			<div class="Binding_pop_box_list">
				<span class="Binding_pop_box_list_left"><i class="Binding_pop_box_list_left_i">*</i>手机号码：</span>
				<input type="text" name="moblie" class="Binding_pop_box_list_text Binding_pop_box_list_textw200">
			</div>
			
			<div class="Binding_pop_box_list">
				<span class="Binding_pop_box_list_left"><i class="Binding_pop_box_list_left_i">*</i>验证码：</span>
				<input type="text" name="phoneimg_code" maxlength="4" class="Binding_pop_box_list_text" />
				<img id="pcode_img" onclick="checkCode('pcode_img');" src="{yun:}$config.sy_weburl{/yun}/app/include/authcode.inc.php" style=" margin:0 5px 5px 5px; vertical-align:middle;">				
			</div>
			
			<div class="Binding_pop_box_list">
				<span class="Binding_pop_box_list_left"><i class="Binding_pop_box_list_left_i">*</i>短信验证码：</span>
				<input type="text" id="moblie_code" class="Binding_pop_box_list_text" style="width:90px;">
				<a href="javascript:;" onclick="sendmoblie('pcode_img');" class="Binding_pop_bth" id="time">免费发送验证码</a>
			</div>
			
			<div class="Binding_pop_sub" style="margin-top:20px;">
				<span class="Binding_pop_box_list_left">&nbsp;</span>
				<input class="xubox_botton_emali" style="margin-right:10px;" onclick="check_moblie();" type="submit" value="保存">
				<input class="xubox_botton_emali xubox_botton_emali_qx" type="button" value="取消" onclick="layer.closeAll();">
			</div>
			
		</div>
	</div>
</div>
<!--弹出框 end-->

<!--营业执照弹出框-->
<div id="yyzz" style=" display:none;">
	<div class="Binding_pop_box" style="padding:10px;width:530px; background:#fff; position:relative">
		
		<div class="Binding_pop_box_msg" >培训执照中的机构全称、年检章等需清晰可辨别，否则不能通过验证。</div>
		
		<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
		
		<form id="certform" name="MyForm" target="supportiframe" method="post" action="index.php?c=binding&act=savecert" enctype="multipart/form-data">
			<div class="Binding_pop_box_list">
				<span class="Binding_pop_box_list_left"><i class="Binding_pop_box_list_left_i">*</i>机构全称：</span>
				<input type="text" value="{yun:}$info.name{/yun}" name="name" id="name" class="Binding_pop_box_list_text Binding_pop_box_list_textw200" />
			</div>
			
			<div class="Binding_pop_box_list">
				<span class="Binding_pop_box_list_left"><i class="Binding_pop_box_list_left_i">*</i>营业执照：</span>
				<div style="float:left; position:relative">
					<button type="button" class="yun_bth_pic noupload" lay-data="{imgid: 'imgicon',parentid: 'imgparent'}">上传图片</button>
                    <input type="hidden" id="laynoupload" value="1"/>
					<input type="hidden" id="old_cert" value="{yun:}$cert.check{/yun}" />
			
					<div id="imgparent" class="Binding_pop_box_img {yun:}if !$cert.check{/yun}none{yun:}/if{/yun}">
						
						<div id="newbind" class="Binding_pop_box_msg_cont_new none">新</div>
						
						<img id="imgicon" src="{yun:}$cert.old_check{/yun}" width="40" height="40"/>
						
						<a id="checka" href="javascript:;" data_url="{yun:}$cert.old_check{/yun}" onclick="showpic(this)" >查看原图</a>
						
					</div>
				</div>
			</div>
			
			<div class="Binding_pop_sub" style="margin-top:20px;"> <span class="Binding_pop_box_list_left">&nbsp;</span>
			 	<input class="Binding_pop_bthbc" type="button" onclick="check_train_cert()" value="保存">
				<input class="Binding_pop_bthqx" type="button" value="取消" onclick="layer.closeAll();" style="margin-left:10px;">
			</div>
			
			<div class="Binding_pop_box_list" style="color:red;"></div>
		</form>
	</div>
</div>
<!--弹出框 end-->
<div id="wxcontent" style=" display:none;">
 <div id="wx_login_qrcode" class="wx_bdtck_pic">正在获取二维码...</div>
<div class="wx_bdtck_p">请使用微信扫描二维码绑定</div>
</div>
<input type="hidden" id="linktel" value="{yun:}$info.linktel{/yun}" />
<input type="hidden" id="linkmail" value="{yun:}$info.linkmail{/yun}" />
<input type="hidden" id="send" value="0" />

<script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
<script>
	layui.use(['layer'], function() {
		var layer = layui.layer,
			$ = layui.$;
	});	
	function showpic(obj){
		var url =	$(obj).attr('data_url');
		var picjson={
		  "data": [ {
			  "src": url, //原图地址
			  "thumb": url //缩略图地址
			}]
		}
		layer.photos({
			photos: picjson
			,anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
		});
	}
	$(document).ready(function(){
		var setval;
		$.post('{yun:}url m=login c=wxlogin{/yun}',{t:1},function(data){
				if(data==0){
					$('#wx_login_qrcode').html('二维码获取失败..');
				}else{
					$('#wx_login_qrcode').html('<img src="'+data+'" width="180" height="180">');
					setval = setInterval("wxorderstatus()", 2000); 
				}
			});

	}); 

	function wxorderstatus() {  
		$.post('{yun:}url m=login c=getwxloginstatus{/yun}',{t:1},function(data){
			var data=eval('('+data+')');
			if(data.url!='' && data.msg!=''){
				layer.msg(data.msg, 2, 9,function(){window.location.href=data.url;});
			}else if(data.url){
				window.location.href=data.url;
			}
		});
	}
	
	function wxshow(){
		$.layer({
			type : 1,
			title : '绑定微信',
			border : [10 , 0.3 , '#000', true],
			area : ['300px','auto'],
			page : {dom :"#wxcontent"}
		});
	}
</script>
{yun:}include file="$trainstyle/footer.htm"{/yun}